from em.models.em_basemodel import BaseModel
from em.mysql.em_sqlmanager import engine, metaData
from sqlalchemy.schema import Table
from datetime import  date

# 策略
class WGStrategy(BaseModel):

    _table = Table('EM_WGSTRATEGY', metaData, autoload=True)
    BaseModel.loadTable('EM_WGSTRATEGY')

    def __init__(self, shortName, fullName, highYearPecentage, highYearKeepDays, maxSuccessPecentage, maxSuccessKeepDays, appendURL, createDate=date):
        self.shortName = shortName
        self.fullName = fullName
        self.highYearKeepDays = highYearKeepDays
        self.highYearPecentage = highYearPecentage
        self.maxSuccessKeepDays = maxSuccessKeepDays
        self.maxSuccessPecentage = maxSuccessPecentage
        self.appendURL = appendURL
        self.createDate = createDate
        pass